package cn.edu.lingnan.lsqn.service;

import java.util.List;

import javax.inject.Inject;

import org.springframework.stereotype.Service;

import cn.edu.lingnan.lsqn.dao.CandidateTypeDao;
import cn.edu.lingnan.lsqn.model.CandidateType;

@Service("candidateTypeService")
public class CandidateTypeService implements ICandidateTypeService {

	private CandidateTypeDao candidateTypeDao;
	
	public CandidateTypeDao getCandidateTypeDao() {
		return candidateTypeDao;
	}
	
	@Inject
	public void setCandidateTypeDao(CandidateTypeDao candidateTypeDao) {
		this.candidateTypeDao = candidateTypeDao;
	}

	@Override
	public void add(CandidateType ctype) {
		candidateTypeDao.add(ctype);
	}

	@Override
	public void delete(int id) {
		candidateTypeDao.delete(id);
	}

	@Override
	public void update(CandidateType ctype) {
		candidateTypeDao.update(ctype);
	}

	@Override
	public CandidateType load(int id) {
		return candidateTypeDao.load(id);
	}

	@Override
	public List<CandidateType> list() {
		return candidateTypeDao.list();
	}

}
